<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ include file="/WEB-INF/jsp/sys/css.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/ui/layui/css/layui.css"  media="all">
	<!-- 百度地图api-->
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=dYVPkKPhEkgWSocoRxdEtfgAaRyeb0bc"></script>
	<script type="text/javascript" src="http://api.map.baidu.com/library/AreaRestriction/1.2/src/AreaRestriction_min.js"></script>
	<style>
		.layui-col-md3{
			height: 70px;
		}
		.righta{
			width: 50%;
		    margin-left: 15px;
		    float: left;
		}
		.numSpan{
			float:right;
		}
		.grid-demo-bg1 img{
			float: right;
		}
		.containerOne{
			width:100%;
			height: 82%;
			border: #eee solid 0.1px;
			margin-top: 10px;
			background-color: #fff;
			background: url(/dhjdglxt/ui/layui/images/dashboard/5市.png) no-repeat;
			background-size: 100% 100%;
		}
		.containerTwo{
			width:100%;
			height: 616px;
			border: #eee solid 0.1px;
			margin-top: 10px;
			background: url(/dhjdglxt/ui/layui/images/dashboard/地图背景.png) no-repeat;
			background-size: 100% 100%;
		}
		.divs{
			width:100%;
			height: 84%;
			display: none
		}
		.conent th{
			background-color: #F0FFF0;
			color: #000000
		}
		.num-style {
   			 width: 12%;
		}
		/* 去掉百度地图版权 */
		.anchorBL{display:none}
	</style>
	
	<%-- <%
		Date date = new Date();
		pageContext.setAttribute("d", date);
    %> --%>
</head>
<body>
	 
	 <div id="fastMap" class="layui-col-md12" ><!-- fastMap --> 
	 	 <div class="layui-col-md5" style="margin-left: 40px;margin-top: 40px;height: 480px;">
		 	 <div id="zhutu" style="height: 430px;margin-left: 40px;border: #eee solid 0.1px;"></div>
		 	 <div id="zhutu2" style="height: 430px;margin-left: 40px;margin-top: 20px;border: #eee solid 0.1px;"></div>  
			 <div  id="containerSix"  style="margin-left: 40px;margin-top: 40px;height: 480px;border: #eee solid 0.1px;background: url(/dhjdglxt/ui/layui/images/dashboard/6市2区.png) no-repeat;background-size: 100% 100%;"></div><!-- containerFast --> 
	 	 </div>
		 <div  class="layui-col-md6" style="height: 100%;margin-left: 40px"><!-- style="margin-left: 40px;float: left;width: 760px;height: 864px" -->
		 	<table id="tbfxmodelInfo1"  class="layui-table" lay-filter="tbfxmodelInfo1" style="margin-top: 40px">
				<thead align="center" class="conent">
					<tr><th colspan="10" style="text-align: center;">关中地区清洁能源替代散煤完成情况表(单位：户)</th></tr>
					<tr>
						<th>市（区）</th>
						<th>统计</th>
						<th>合计</th>
						<th>电</th>
						<th>天然气</th>
						<th>洁净煤</th>
						<th>地热</th>
						<th>集中供热</th>
						<th>太阳能</th>
						<th>其他</th>
					</tr>
				</thead>
				<tbody id="tbody-result1">
					
				</tbody>
			</table>
			<table id="tbfxmodelInfo2" class="layui-table" lay-filter="tbfxmodelInfo2" style="margin-top: 40px">
				<thead align="center" class="conent">
					<tr><th colspan="10" style="text-align: center;">关中地区2019年度清洁能源替代散煤计划情况表(单位：户)</th></tr>
					<tr>
						<th>市（区）</th>
						<th>统计</th>
						<th>合计</th>
						<th>电</th>
						<th>天然气</th>
						<th>洁净煤</th>
						<th>地热</th>
						<th>集中供热</th>
						<th>太阳能</th>
						<th>其他</th>
					</tr>
				</thead>
				<tbody id="tbody-result2">
				</tbody>
			</table>
			<!-- <div id='jihua' style="margin-top: 20px;height: 400px;width: 100%"></div> -->
		 </div>
	 </div>
	 <!-- 六市一区静态图  -->
	 <%-- <div id="twoMap" class="layui-col-md12" style="display: none;background: url(/dhjdglxt/ui/layui/images/dashboard/6市2区.png) no-repeat;background-size: 100% 100%;">
		 <div id="containerSix" class="layui-col-md9" style="height: 100%" onclick="nextMap()"></div>
		 <div style="float: right;width: 65px;margin-top: 10px;">
	   		<button class="layui-btn layui-btn-danger" onclick="goBackFast()">返回</button>
   		 </div>
		 <div class="layui-col-md2" style="margin-top: 36px;margin-left: 60px;"><!-- twoDiv -->
		 
		 	<div style="margin-top: 10px;width: 100%;">
		 		<div  style="padding: 15px;width: 100%;height: 20px">
			      <div id="mapCityName">
				      <font></font>
			      </div>
			    </div>
			    <div  style="padding: 15px;width: 100%;height: 20px">
			      <div class="grid-demo grid-demo-bg1" style="float: left;">
			      	   <img src="${pageContext.request.contextPath}/ui/layui/images/dashboard/icon1.png"></img>
			      </div>
			      <div class="righta">
				      <div class="grid-demo grid-demo-bg1 floatA" id="numZ2"><font color="#007CD7" size="4px"></font></div>
				      <div class="grid-demo grid-demo-bg1 floatB">煤改总数</div>
			      </div>
			    </div>
			    <div style="padding: 15px;width: 100%;height: 20px">
			      <div class="grid-demo grid-demo-bg1" style="float: left;">
			      	   <img src="${pageContext.request.contextPath}/ui/layui/images/dashboard/icon2.png"></img>
			      </div>
			      <div class="righta">
				      <div class="grid-demo grid-demo-bg1 floatA" id="numQi2"><font color="#42C88C" size="4px"></font></div>
				      <div class="grid-demo grid-demo-bg1 floatB">煤改气</div>
			      </div>
			    </div>
			    <div  style="padding: 15px;width: 100%;height: 20px">
			      <div class="grid-demo grid-demo-bg1" style="float: left;">
			      	   <img src="${pageContext.request.contextPath}/ui/layui/images/dashboard/icon3.png"></img>
			      </div>
			      <div class="righta">
				      <div class="grid-demo grid-demo-bg1 floatA" id="numDian2"><font color="#96C93E" size="4px"></font></div>
				      <div class="grid-demo grid-demo-bg1 floatB">煤改电</div>
			      </div>
			    </div>
			    <div style="padding: 15px;width: 100%;height: 20px">
			      <div class="grid-demo grid-demo-bg1" style="float: left;">
			      	   <img src="${pageContext.request.contextPath}/ui/layui/images/dashboard/icon4.png"></img>
			      </div>
			      <div class="righta">
				      <div class="grid-demo grid-demo-bg1 floatA" id="numJie2"><font color="#00B4D5" size="4px"></font></div>
				      <div class="grid-demo grid-demo-bg1 floatB">散煤改洁净煤</div>
			      </div>
			    </div>
			</div>
			
			
		 </div>
	 </div> --%>
	 
	 <div id="containerEchars" class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief" style="display: none">
		  <ul class="layui-tab-title">
		    <li class="layui-this">散煤治理</li>
		    <!-- <li>洁净煤供应</li> -->
		  </ul>
		  <div class="layui-tab-content" style="background-color: #ecf0f1;height: 850px">
		    <div class="layui-tab-item layui-show" >
		    	<!-- 上方卡片-->
		    	<div id="goBackTwo" style="float: right;width: 65px;">
			   		<button class="layui-btn layui-btn-danger" onclick="goBackTwo()">返回</button>
		   		</div>
		   		<!-- <div id="goBackThere" style="float: right;width: 65px;display: none">
			   		<button class="layui-btn layui-btn-danger" onclick="goBackThere()">返回</button>
		   		</div> -->
		   		<div id="goBack" style="float: right;width: 65px;display: none">
			   		<button class="layui-btn layui-btn-danger" onclick="goBack()">返回</button>
		   		</div>
		   		
		    	<div class="layui-col-md9">
			    	<div style="border: #eee solid 0.1px; background-color: #fff;margin-top: 47px;width: 100%;">
					    <%-- <div class="layui-col-md2 num-style" style="padding: 15px;margin-left: 35px;">
					      <div class="grid-demo grid-demo-bg1"  style="width: 20%;float: left;">
					      	   <img src="${pageContext.request.contextPath}/ui/layui/images/dashboard/icon1.png"></img>
					      </div>
					      <div class="righta">
						      <div class="grid-demo grid-demo-bg1 floatA" id="numZ"><font color="#007CD7" size="4px">32875</font></div>
						      <div class="grid-demo grid-demo-bg1 floatB">煤改总数</div>
					      </div>
					    </div>
					    <div class="layui-col-md2 num-style" style="padding: 15px;">
					      <div class="grid-demo grid-demo-bg1" style="width: 20%;float: left;">
					      	   <img src="${pageContext.request.contextPath}/ui/layui/images/dashboard/icon3.png"></img>
					      </div>
					      <div class="righta">
						      <div class="grid-demo grid-demo-bg1 floatA" id="numDian"><font color="#96C93E" size="4px">32875</font></div>
						      <div class="grid-demo grid-demo-bg1 floatB">电</div>
					      </div>
					    </div>
					    <div class="layui-col-md2 num-style" style="padding: 15px;">
					      <div class="grid-demo grid-demo-bg1" style="width: 20%;float: left;">
					      	   <img src="${pageContext.request.contextPath}/ui/layui/images/dashboard/icon2.png"></img>
					      </div>
					      <div class="righta">
						      <div class="grid-demo grid-demo-bg1 floatA" id="numQi"><font color="#42C88C" size="4px">32875</font></div>
						      <div class="grid-demo grid-demo-bg1 floatB">天然气</div>
					      </div>
					    </div>
					    <div class="layui-col-md2 num-style" style="padding: 15px;">
					      <div class="grid-demo grid-demo-bg1" style="width: 20%;float: left;">
					      	   <img src="${pageContext.request.contextPath}/ui/layui/images/dashboard/icon4.png"></img>
					      </div>
					      <div class="righta">
						      <div class="grid-demo grid-demo-bg1 floatA" id="numJie"><font color="#00B4D5" size="4px">32875</font></div>
						      <div class="grid-demo grid-demo-bg1 floatB">洁净煤</div>
					      </div>
					    </div>
					    <div class="layui-col-md2 num-style" style="padding: 15px;">
					      <div class="grid-demo grid-demo-bg1" style="width: 20%;float: left;">
					      	   <img src="${pageContext.request.contextPath}/ui/layui/images/dashboard/icon2.png"></img>
					      </div>
					      <div class="righta">
						      <div class="grid-demo grid-demo-bg1 floatA" id="numDi"><font color="#96C93E" size="4px">32875</font></div>
						      <div class="grid-demo grid-demo-bg1 floatB">地热</div>
					      </div>
					    </div>
					    <div class="layui-col-md2 num-style" style="padding: 15px;">
					      <div class="grid-demo grid-demo-bg1" style="width: 20%;float: left;">
					      	   <img src="${pageContext.request.contextPath}/ui/layui/images/dashboard/icon2.png"></img>
					      </div>
					      <div class="righta">
						      <div class="grid-demo grid-demo-bg1 floatA" id="numJi"><font color="#42C88C" size="4px">32875</font></div>
						      <div class="grid-demo grid-demo-bg1 floatB">集中供热</div>
					      </div>
					    </div>
					    <div class="layui-col-md2 num-style" style="padding: 15px;">
					      <div class="grid-demo grid-demo-bg1" style="width: 20%;float: left;">
					      	   <img src="${pageContext.request.contextPath}/ui/layui/images/dashboard/icon3.png"></img>
					      </div>
					      <div class="righta">
						      <div class="grid-demo grid-demo-bg1 floatA" id="numTai"><font color="#00B4D5" size="4px">32875</font></div>
						      <div class="grid-demo grid-demo-bg1 floatB">太阳能</div>
					      </div>
					    </div>
					    <div class="layui-col-md2 num-style" style="padding: 15px;">
					      <div class="grid-demo grid-demo-bg1" style="width: 20%;float: left;">
					      	   <img src="${pageContext.request.contextPath}/ui/layui/images/dashboard/icon4.png"></img>
					      </div>
					      <div class="righta">
						      <div class="grid-demo grid-demo-bg1 floatA" id="numQi2"><font color="#00B4D5" size="4px">32875</font></div>
						      <div class="grid-demo grid-demo-bg1 floatB">其他</div>
					      </div>
					    </div> --%>
					   	<div  id="isMapCount">
					   		<table  class="layui-table" lay-filter="tbfxmodelInfo1" >
							<thead align="center" class="conent">
								<tr><th colspan="10" style="text-align: center;">区县清洁能源替代散煤完成情况表(单位：户)</th></tr>
								<tr>
									<th>县（区）</th>
									<th>统计</th>
									<th>合计</th>
									<th>电</th>
									<th>天然气</th>
									<th>洁净煤</th>
									<th>地热</th>
									<th>集中供热</th>
									<th>太阳能</th>
									<th>其他</th>
								</tr>
							</thead>
							<tbody id="mapCount">
								
							</tbody>
							</table>
					   	</div>
					</div>
					
					<!-- 地图 -->
			    	<!-- <div  id="containerOne" class="containerOne" ></div> -->
			    	
			    	<!-- 区县地图 -->
			    	<div  id="containerBoth" style="width:100%;height:84%;display: none">
			    		
			    		<!-- <div style="margin-top: 10px;width: 65px;">
					   		<button class="layui-btn layui-btn-danger" onclick="goBackBoth()">返回</button>
				   		</div> -->
				   		
			    		<div  id="containerTwo" class="containerTwo" ></div>
			    	</div>
			    	
					<!-- 详细百度地图 -->
			    	<div  id="divs" class="divs" >
					   <div style="margin-top: 10px; height: 39px;">
					   		<div style="width:100%">
					   			<div style="float: left">
									<label class="layui-form-label">市：</label>
									<div class="layui-input-inline" style="width: 120px">
										<input id="province" type="text" autocomplete="off" class="layui-input" readonly="readonly">
								    </div>
								    <!-- <select name="province" id="province" class="layui-select">
										<option>=请选择城市=</option>
									</select> -->
					   			</div>
					   			<div style="float: left">
									<label class="layui-form-label">区：</label>
									<div class="layui-input-inline" style="width: 120px">
										<input id="city" type="text" autocomplete="off" class="layui-input" readonly="readonly">
								    </div>
								    <!-- <select name="city" id="city" class="layui-select">
										<option>=请选择区县=</option>
									</select> -->
					   			</div>
					   			<div style="float: left">
									<label class="layui-form-label">乡镇：</label>
								    <select name="area" id="area" class="layui-select">
										<option>=请选择乡镇、街道=</option>
									</select>
					   			</div>
					   			<!-- <div style="float: left">
									<label class="layui-form-label">乡：</label>
								    <select name="street" id="street" class="layui-select" onclick="loadVillage(this)">
										<option>=请选择乡镇、街道=</option>
									</select>
					   			</div> -->
					   			<div style="float: left;">
									<label class="layui-form-label">地址：</label>
								    <div class="layui-input-inline" >
								      <input  id="cityName" type="text" placeholder="请输入地址" autocomplete="off" class="layui-input">
								    </div>
					   			</div>
					   			<div style="float: right;margin-left: 20px;">
									<button id="keyDown" class="layui-btn layui-btn-normal" onclick="theLocation()">搜索</button>
								</div>
							</div>
					   </div>
					   <div id="container" style="width: 100%; height: 566px;margin-top: 10px;" ></div>
				  	 </div> 	
		    	</div>
		    	<!-- 右卡片-->
		    	<div class="layui-col-md3">
			    	<div  style="height: 312px;border: #eee solid 0.1px;margin-top: 9px;margin-left: 20px;background-color: #fff;">
				   		<div style='padding: 12px'><font size="4px">清洁能源替代完成情况排行榜</font></div>
				   		<div id="paihang" style='padding: 10px'>
				   			<ul>
				   				<li style='padding: 5px'><img src='${pageContext.request.contextPath}/ui/layui/images/dashboard/icon_金.png'></img>宝鸡市<span class='numSpan'>85%</span></li>
				   				<li style='padding: 5px'><img src='${pageContext.request.contextPath}/ui/layui/images/dashboard/icon_银.png'></img>西安市<span class='numSpan'>85%</span></li>
				   				<li style='padding: 5px'><img src='${pageContext.request.contextPath}/ui/layui/images/dashboard/icon_铜.png'></img>渭南市<span class='numSpan'>85%</span></li>
				   				<li style='padding: 5px'><img style="padding-left: 5px" src='${pageContext.request.contextPath}/ui/layui/images/dashboard/4.png'></img>   咸阳市<span class='numSpan'>85%</span></li>
				   				<li style='padding: 5px'><img style="padding-left: 5px" src='${pageContext.request.contextPath}/ui/layui/images/dashboard/5.png'></img>   韩城市<span class='numSpan'>85%</span></li>
				   			</ul>
				   		</div>
				    </div>
				    <div  id="bing" style="height: 250px;border: #eee solid 0.1px;margin-top: 23px;margin-left: 20px;background-color: #fff;">
				   		
				    </div>
				    <div  id="yibiao" style="height: 193px;border: #eee solid 0.1px;margin-top: 23px;margin-left: 20px;background-color: #fff;">
				   		
				    </div>
		    	</div>
		    	
			   
		    </div>
		    
		    <!-- 选项卡二 -->
		    <!-- <div class="layui-tab-item">
		    			上方卡片
		    	<div class="layui-col-md12">
					地图
			    	<div  id="containerOne2" class="containerOne" style="height: 99%;margin-top: 5px;"></div>
					
			    	<div  id="divs2" class="divs" style="height: 700px">
					  <div style="margin-top: 10px; height: 39px;">
					   		<div style="width:100%">
					   		
					   			<div style="float: left">
									<label class="layui-form-label">市：</label>
									<div class="layui-input-inline" style="width: 120px">
										<input id="province2" type="text" autocomplete="off" class="layui-input" readonly="readonly">
								    </div>
								    <select name="province" id="province" class="layui-select">
										<option>=请选择城市=</option>
									</select>
					   			</div>
					   			<div style="float: left">
									<label class="layui-form-label">区：</label>
								    <select  id="city2" class="layui-select">
										<option>=请选择区县=</option>
									</select>
					   			</div>
					   			<div style="float: left">
									<label class="layui-form-label">乡镇：</label>
								    <select  id="area2" class="layui-select">
										<option>=请选择乡镇、街道=</option>
									</select>
					   			</div>
					   			<div style="float: left">
									<label class="layui-form-label">地址：</label>
								    <div class="layui-input-inline">
								      <input  id="cityName2" type="text" placeholder="请输入地址" autocomplete="off" class="layui-input">
								    </div>
					   			</div>
					   			<div style="float: left;margin-left: 20px;">
									<button id="keyDown2" class="layui-btn layui-btn-normal" onclick="theLocation2()">搜索</button>
								</div>
								<div style="float: right;width: 65px;">
							   		<button class="layui-btn layui-btn-danger" onclick="goBack2()">返回</button>
						   		 </div>
							</div>
					   </div>
					   
					   <div id="container2" style="width: 100%; height: 700px;margin-top: 10px;" ></div>
				   </div>
		    	</div>
		    
		    
		    </div> -->
		  </div>
		</div>
       
	 <script type="text/javascript" src="${pageContext.request.contextPath}/modules/dashboards/js/FastMap.js"></script>    
	 <%--  <script type="text/javascript" src="${pageContext.request.contextPath}/modules/dashboards/js/map.js"></script> --%>    
	 <script type="text/javascript" src="${pageContext.request.contextPath}/modules/dashboards/js/dashboard.js"></script>    
	 <%-- <script type="text/javascript" src="${pageContext.request.contextPath}/modules/dashboards/js/dashboard2.js"></script>  --%>    
	 <script type="text/javascript" src="${pageContext.request.contextPath}/modules/dashboards/js/marker.js"></script>
	 <script type="text/javascript" src="${pageContext.request.contextPath}/modules/dashboards/js/data.js"></script>
	 <script type="text/javascript" src="${pageContext.request.contextPath}/modules/dashboards/js/city.js"></script>
     <script type="text/javascript">
     		var basePath= "${pageContext.request.contextPath}";
     		var zhutu = document.getElementById("zhutu");
	   		var zhutuEch = echarts.init(zhutu);
	   		
	   		var zhutu2 = document.getElementById("zhutu2");
	   		var zhutuEch2 = echarts.init(zhutu2);
       </script>
       <script>
       		
       	   $(function(){
	      		getCharsMapData();
	  			chartPhoto();
	  			showEchars();
	  			showEchars2();
	  			glgzqk();
	  			$.get('json/six.json', function (geoJson) {
	  				myFast.hideLoading();
    			    echarts.registerMap('HK', geoJson);
    			    myFast.setOption(optionMap);// 选项卡一地图数据
    		   });
       	   });
       		
           function goBackFast(){
	 		     $("#twoMap").hide();
	 		     $("#containerEchars").hide();
	       		 $("#fastMap").show();
       	   };
       	   
	       function goBackTwo(){
	    	     /* $("#numZ2").empty();
	    		 $("#numQi2").empty();
	    		 $("#numDian2").empty();
	    		 $("#numJie2").empty();
	    		 $("#mapCityName").empty(); */
			     $("#containerEchars").hide();
	      		 $("#fastMap").show();
	  	   };
       	
	       function goBack(){
	    	    map.clearOverlays(); 
	    	    blist = [];
	    	    $("#area").empty();
	    	    $("#area").append("<option>=请选择乡镇、街道=</option>");//添加option
	    	    
	    	    $("#goBack").hide();
	    		$("#goBackTwo").show();
	    		
	    	    $("#divs").hide();
	    	    $("#containerBoth").show();
	    	    /* var city = $("#province").val();
	    	    var county = '';
	   			getCharsData(city,county);
	   			getFinData(city,county);
	   			getCoalFin(city,county);
	   			getCharsMapData();  */
	       }
	       /* function goBack2(){
	    	   // location.reload();
	    	    map2.clearOverlays(); 
	    	    blist2 = [];
	    	    $("#area2").empty();
	    	    $("#area2").append("<option>=请选择乡镇、街道=</option>");//添加option
	    	    $("#divs2").hide();
	    	    $("#containerOne2").show();
	       } */
	       
    	   /* function nextMap(){
    		   $("#fastMap").hide();
    		   $("#twoMap").hide();
    		   $("#containerEchars").show();
	   		    var city = '';
	   			getCharsData(city,city);
	   			getFinData(city,city);
	   			getCoalFin(city,city);
    		    downLoadMap();// 加载echars地图
    	   } */
    	   
    	   function downLoadMap(){
    		   myChart.resize();
    		   $.get('json/61.json', function (geoJson) {
    		   	   myChart.hideLoading();
    		       echarts.registerMap('HK', geoJson);
    		       myChart.setOption(optionMap);// 选项卡一地图数据
    		   });
    	   }
    	   
    	   /* function nextStatic(){
    		   $("#fastMap").hide();
    		   $("#twoMap").show();
    		   mySix.resize();
    		   $.get('json/six.json', function (geoJson) {
    				mySix.hideLoading();
    			    echarts.registerMap('HK', geoJson);
    			    mySix.setOption(optionMap);// 选项卡一地图数据
    		   });
    	   } */
    	   
    	   $("body").keydown(function (e) {//当按下按键时
    		    if (e.which == 13) {//.which属性判断按下的是哪个键，回车键的键位序号为13
    		    	$('#keyDown').click();;//触发搜索按钮的点击事件
    		    	$('#keyDown2').click();
    		    }
    		});
    	   
    	   function goBackThere(){
    		    $("#goBackTwo").show();
    		    $("#goBackThere").hide();
    		   
	    	    $("#divs").hide();
	    		$("#containerBoth").show();
    		    map.clearOverlays();
	    	    var city = '';
	   			getCharsData(city,city);
	   			getFinData(city,city);
	   			getCoalFin(city,city);
	   			getCharsMapData();
    	   }
    	   
    	   $("li").click(function() {
     		  $(".layui-tab-title li").removeClass("layui-this");
     		  this.className = "layui-this";
     		  $(".layui-tab-item").removeClass("layui-show");
     		  $(".layui-tab-item")[$(this).index()].className = "layui-tab-item layui-show";
	     	   myChart2.resize();
	     	   
	     	   $.get('json/61.json', function (geoJson) {
	   		       myChart2.hideLoading();
	   		       echarts.registerMap('HK', geoJson);
	   		       myChart2.setOption(optionMap2);//选项卡二地图数据
	   		   });
	     	   
       	   });
    	   
    	   
    	   function chartPhoto(){
    		   $.ajax({
    		        type: "post",
    		        url: basePath+'/service/smzl/residentcoal/getCoalData',
    		        async: false,
    		        dataType: "json",
    		        success: function (map) {
    		        	var city = [];var dian = []; var qi = [];  var jie = [];var di = []; var ji = [];var tai = []; var qi2 = []; 
    		        	var html="";
    		        	var dianh = 0;var qih = 0;var jieh = 0;var dih = 0;var jih = 0;var taih = 0;var qi2h = 0;
    		        	var hj = 0;
    		        	city.push('合计');
    		        	$.each(map.data,function(i,item){
    		        		city.push(item.city);dian.push(item.dian);qi.push(item.qi);jie.push(item.jie);di.push(item.di);ji.push(item.ji);tai.push(item.tai);qi2.push(item.qi2);
    		        		var count = Number(isNaN(item.dian)?0:item.dian)+Number(isNaN(item.qi)?0:item.qi)+Number(isNaN(item.di)?0:item.di)+Number(isNaN(item.jie)?0:item.jie)+Number(isNaN(item.ji)?0:item.ji)+Number(isNaN(item.tai)?0:item.tai)+Number(isNaN(item.qi2)?0:item.qi2);
    		        		var ccount = Number(isNaN(item.cdian)?0:item.cdian)+Number(isNaN(item.cqi)?0:item.cqi)+Number(isNaN(item.cdi)?0:item.cdi)+Number(isNaN(item.cjie)?0:item.cjie)+Number(isNaN(item.cji)?0:item.cji)+Number(isNaN(item.ctai)?0:item.ctai)+Number(isNaN(item.cqi2)?0:item.cqi2);
    		        		var ccountlv =  Math.round(ccount / count * 10000) / 100.00;
    		        		var cdianlv =  Math.round(item.cdian / item.dian * 10000) / 100.00;
    		        		var cqilv =  Math.round(item.cqi / item.qi * 10000) / 100.00;
    		        		var cjielv =  Math.round(item.cjie / item.jie * 10000) / 100.00;
    		        		var cdilv =  Math.round(item.cdi / item.di * 10000) / 100.00;
    		        		var cjilv =  Math.round(item.cji / item.ji * 10000) / 100.00;
    		        		var ctailv =  Math.round(item.ctai / item.tai * 10000) / 100.00;
    		        		var cqi2lv =  Math.round(item.cqi2 / item.qi2 * 10000) / 100.00;
    		        		html+="<tr><td rowspan='3'>"+item.city+"</td>"+
    		        			  "<td>累计数</td>"+
    		        			  "<td>"+count+"</td>"+
    		        			  "<td>"+item.dian+"</td>"+
    		        			  "<td>"+item.qi+"</td>"+
    		        			  "<td>"+item.jie+"</td>"+
    		        			  "<td>"+item.di+"</td>"+
    		        			  "<td>"+item.ji+"</td>"+
    		        			  "<td>"+item.tai+"</td>"+
    		        			  "<td>"+item.qi2+"</td></tr>"+
    		        			  "<tr><td>完成数</td>"+
    		        			  "<td>"+ccount+"</td>"+
    		        			  "<td>"+item.cdian+"</td>"+
    		        			  "<td>"+item.cqi+"</td>"+
    		        			  "<td>"+item.cjie+"</td>"+
    		        			  "<td>"+item.cdi+"</td>"+
    		        			  "<td>"+item.cji+"</td>"+
    		        			  "<td>"+item.ctai+"</td>"+
    		        			  "<td>"+item.cqi2+"</td></tr>"+
    		        			  "<tr><td>完成率</td>"+
    		        			  "<td>"+Number(isNaN(ccountlv)?0:ccountlv)+"%</td>"+
    		        			  "<td>"+Number(isNaN(cdianlv)?0:cdianlv)+"%</td>"+
    		        			  "<td>"+Number(isNaN(cqilv)?0:cqilv)+"%</td>"+
    		        			  "<td>"+Number(isNaN(cjielv)?0:cjielv)+"%</td>"+
    		        			  "<td>"+Number(isNaN(cdilv)?0:cdilv)+"%</td>"+
    		        			  "<td>"+Number(isNaN(cjilv)?0:cjilv)+"%</td>"+
    		        			  "<td>"+Number(isNaN(ctailv)?0:ctailv)+"%</td>"+
    		        			  "<td>"+Number(isNaN(cqi2lv)?0:cqi2lv)+"%</td></tr>"
    		        		dianh+=Number(isNaN(item.dian)?0:item.dian);qih+=Number(isNaN(item.qi)?0:item.qi);dih+=Number(isNaN(item.di)?0:item.di);
    		        		jieh+=Number(isNaN(item.jie)?0:item.jie);jih+=Number(isNaN(item.ji)?0:item.ji);taih+=Number(isNaN(item.tai)?0:item.tai);
    		        		qi2h+=Number(isNaN(item.qi2)?0:item.qi2);
    		        		hj+=count;
    		        	});
    		          /* html+="<tr><td>合计</td>"+	  
    		          "<td>"+hj+"</td>"+
    		          "<td>"+dianh+"</td>"+
    				  "<td>"+qih+"</td>"+
    				  "<td>"+jieh+"</td>"+
    				  "<td>"+dih+"</td>"+
    				  "<td>"+jih+"</td>"+
    				  "<td>"+taih+"</td>"+
    				  "<td>"+qi2h+"</td></tr>"; */
	   		          dian =  prepend(dian,dianh);
	   		          qi =  prepend(qi,qih);
	   		          di =  prepend(di,dih);
	   		          jie =  prepend(jie,jieh);
	   		          ji =  prepend(ji,jih);
	   		          tai =  prepend(tai,taih);
	   		          qi2 =  prepend(qi2,qi2h);
	   		        	$("#tbody-result1").empty();
	   		        	$("#tbody-result1").append(html.replace(/undefined/g, "0"));
    		        }
    			});
    	   }
    	   function glgzqk(){
    		   $.ajax({
   		        type: "post",
   		        url: basePath+'/service/smzl/residentcoal/getCoalData?year=2019',
   		        async: false,
   		        dataType: "json",
   		        success: function (map) {
   		        	var html="";
   		        	$.each(map.data,function(i,item){
   		        		var count = Number(isNaN(item.dian)?0:item.dian)+Number(isNaN(item.qi)?0:item.qi)+Number(isNaN(item.di)?0:item.di)+Number(isNaN(item.jie)?0:item.jie)+Number(isNaN(item.ji)?0:item.ji)+Number(isNaN(item.tai)?0:item.tai)+Number(isNaN(item.qi2)?0:item.qi2);
		        		var ccount = Number(isNaN(item.cdian)?0:item.cdian)+Number(isNaN(item.cqi)?0:item.cqi)+Number(isNaN(item.cdi)?0:item.cdi)+Number(isNaN(item.cjie)?0:item.cjie)+Number(isNaN(item.cji)?0:item.cji)+Number(isNaN(item.ctai)?0:item.ctai)+Number(isNaN(item.cqi2)?0:item.cqi2);
		        		var ccountlv =  Math.round(ccount / count * 10000) / 100.00;
		        		var cdianlv =  Math.round(item.cdian / item.dian * 10000) / 100.00;
		        		var cqilv =  Math.round(item.cqi / item.qi * 10000) / 100.00;
		        		var cjielv =  Math.round(item.cjie / item.jie * 10000) / 100.00;
		        		var cdilv =  Math.round(item.cdi / item.di * 10000) / 100.00;
		        		var cjilv =  Math.round(item.cji / item.ji * 10000) / 100.00;
		        		var ctailv =  Math.round(item.ctai / item.tai * 10000) / 100.00;
		        		var cqi2lv =  Math.round(item.cqi2 / item.qi2 * 10000) / 100.00;
   		        		/* html+="<tr><td>"+item.city+"</td>"+
   		        			  "<td>"+item.plan+"</td>"+
   		        			  "<td>"+item.count+"</td>"+
   		        			  "<td>"+item.dian+"</td>"+
   		        			  "<td>"+item.qi+"</td>"+
   		        			  "<td>"+item.jie+"</td>"+
   		        			  "<td>"+item.di+"</td>"+
   		        			  "<td>"+item.ji+"</td>"+
   		        			  "<td>"+item.tai+"</td>"+
   		        			  "<td>"+item.qi2+"</td>"+
   		        			  "<td>"+Number(isNaN(lv)?0:lv)+"%</td></tr>"; */
   		        	    
   		        		html+="<tr><td rowspan='3'>"+item.city+"</td>"+
		        			  "<td>任务数</td>"+
		        			  "<td>"+count+"</td>"+
		        			  "<td>"+item.dian+"</td>"+
		        			  "<td>"+item.qi+"</td>"+
		        			  "<td>"+item.jie+"</td>"+
		        			  "<td>"+item.di+"</td>"+
		        			  "<td>"+item.ji+"</td>"+
		        			  "<td>"+item.tai+"</td>"+
		        			  "<td>"+item.qi2+"</td></tr>"+
		        			  "<tr><td>完成数</td>"+
		        			  "<td>"+ccount+"</td>"+
		        			  "<td>"+item.cdian+"</td>"+
		        			  "<td>"+item.cqi+"</td>"+
		        			  "<td>"+item.cjie+"</td>"+
		        			  "<td>"+item.cdi+"</td>"+
		        			  "<td>"+item.cji+"</td>"+
		        			  "<td>"+item.ctai+"</td>"+
		        			  "<td>"+item.cqi2+"</td></tr>"+
		        			  "<tr><td>完成率</td>"+
		        			  "<td>"+Number(isNaN(ccountlv)?0:ccountlv)+"%</td>"+
		        			  "<td>"+Number(isNaN(cdianlv)?0:cdianlv)+"%</td>"+
		        			  "<td>"+Number(isNaN(cqilv)?0:cqilv)+"%</td>"+
		        			  "<td>"+Number(isNaN(cjielv)?0:cjielv)+"%</td>"+
		        			  "<td>"+Number(isNaN(cdilv)?0:cdilv)+"%</td>"+
		        			  "<td>"+Number(isNaN(cjilv)?0:cjilv)+"%</td>"+
		        			  "<td>"+Number(isNaN(ctailv)?0:ctailv)+"%</td>"+
		        			  "<td>"+Number(isNaN(cqi2lv)?0:cqi2lv)+"%</td></tr>"
   		        	});
   		         
   		        	$("#tbody-result2").empty();
   		        	$("#tbody-result2").append(html.replace(/undefined/g, "0"));
   		        }
   			});
    	   }
    	   
    	   
    	   
    	   
    	   function showEchars(){
    		   $.ajax({
   		        type: "post",
   		        url: basePath+'/service/smzl/api/getFastEchars',
   		        async: false,
   		        dataType: "json",
   		        success: function (map) {
   		        	var city = [], count = [], finish = [];
   		        	$.each(map.data,function(i,item){
   		        		city.push(item.city);
   		        		count.push(item.count);
   		        		finish.push(item.finish);
   		        	});
   		        	optionZhuTu = {
   		        			title :{text:'关中地区清洁能源替代散煤统计图'},
   		    			    tooltip : {
   		    			        trigger: 'axis'
   		    			    },
	   		    			grid: {
	   		                  left: '1%',
	   		                  right: '1%',
	   		                  bottom: '5%',
	   		                  containLabel: true
	   		                },
   		    			    color:["#33CCCC","#ccffff","#ccff00"],
   		    			    legend: {
   		    			     	x: 'right',
   		    			        data:['累计数','完成数']
   		    			    },
   		    			    calculable : true,
   		    			    xAxis : [
   		    			        {
   		    			            type : 'category',
   		    			            data : city,
   		    			            axisLabel: {  
   		    					    	   interval:0,  
   		    					    	   rotate:40  
   		    					    }
   		    			        } 
   		    			         
   		    			    ],
   		    			    yAxis : [
   		    			        {
   		    			            type : 'value',
   		    			            name: '户'
   		    			        }
   		    			    ],
   		    			    series : [
   		    			        {
   		    			            name:'累计数',
   		    			            type:'bar',
   		    			            data:count
   		    			        },
		    			        {
		    			            name:'完成数',
		    			            type:'bar',
		    			            data:finish
		    			        }
   		    			    ]
   		    			};
    	  			 zhutuEch.setOption(optionZhuTu, true); 
   		        }
   			});
    	   }
    	   
    	   function showEchars2(){
    		   $.ajax({
   		        type: "post",
   		        url: basePath+'/service/smzl/api/getFastEchars?year=2019',
   		        async: false,
   		        dataType: "json",
   		        success: function (map) {
   		        	var city = [], count = [], plan = [];
   		        	$.each(map.data,function(i,item){
   		        		city.push(item.city);
   		        		count.push(item.count);
   		        		plan.push(item.plan);
   		        	});
   		        	optionZhuTu = {
   		        			title :{text:'19年关中地区清洁能源替代散煤统计图'},
   		    			    tooltip : {
   		    			        trigger: 'axis'
   		    			    },
	   		    			grid: {
	   		                  left: '1%',
	   		                  right: '1%',
	   		                  bottom: '5%',
	   		                  containLabel: true
	   		                },
   		    			    color:["#33CCCC","#ccffff"],
   		    			    legend: {
   		    			     	x: 'right',
   		    			        data:['19年计划数','19年完成数']
   		    			    },
   		    			    calculable : true,
   		    			    xAxis : [
   		    			        {
   		    			            type : 'category',
   		    			            data : city,
   		    			            axisLabel: {  
   		    					    	   interval:0,  
   		    					    	   rotate:40  
   		    					    }
   		    			        } 
   		    			         
   		    			    ],
   		    			    yAxis : [
   		    			        {
   		    			            type : 'value',
   		    			            name: '户'
   		    			        }
   		    			    ],
   		    			    series : [
   		    			        {
   		    			            name:'19年计划数',
   		    			            type:'bar',
   		    			            data:plan
   		    			        },
   		    			        {
   		    			            name:'19年完成数',
   		    			            type:'bar',
   		    			            data:count
   		    			        }
   		    			    ]
   		    			};
    	  			 zhutuEch2.setOption(optionZhuTu, true); 
   		        }
   			});
    	   }
    	   
    	   zhutuEch.on('click', function(param) {
    		   
    		   var name = param.name;
    		   joinMap(name);
    	   });
    	   
    	   function prepend(arr, item) {
    		    return [item].concat(arr);
    	   }
    	   
       </script>
   </body>
</html>